<?php include('./templete/public/head.php') ?>
<body class="mbHeight">
<!--底部导航-->
<?php include('./templete/public/foot.php') ?>
<!--index-banner-->
<div id="slider" class="mui-slider index-banner" >
    <div class="mui-slider-group mui-slider-loop">
        <!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
        <div class="mui-slider-item mui-slider-item-duplicate">
            <a href="<?php echo $banner[count($banner)-1]['link']?>"><img src="<?php echo $banner[count($banner)-1]['img_url_cn']?>"/></a>
        </div>
        <!-- 第一张 -->
        <?php foreach ($banner as $v){?>
        <div class="mui-slider-item">
            <a href="<?php echo $v['link']?>"><img src="<?php echo $v['img_url_cn']?>"/></a>
        </div>
        <?php }?>
        <!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
        <div class="mui-slider-item mui-slider-item-duplicate">
            <a href="<?php echo $banner[0]['link']?>"><img src="<?php echo $banner[0]['img_url_cn']?>"/></a>
        </div>
    </div>
</div>
<!--分类-->
<div class="index-fenlei">
    <ul>
        <?php foreach ($nav as $v){?>
        <li>
            <a href="<?php echo url($v['link']) ?>" target="_blank">
                <img src="<?php echo $v['img_url_cn']?>" alt="">
                <p><?php echo $v['name_cn']?></p>
            </a>
        </li>
        <?php }?>

    </ul>
</div>
<hr class="bgcolor">
<!--旅游天地-->
<div class="index-main tourism-world">

        <div class="main-content tword-content">
            <div class="c-title">
                <img src="_images/icon/index-icon1.png"/>
                <p class="pfbold">金点子</p>
            </div>
            <br/>
            <br/>
            <div class="c-list">
                <?php foreach ($jdz_list as $j_v){?>
                    <a class="list-item clearfix" href="<?php echo url('jdz/detail',['id'=>$j_v['id']])?>">
                        <div class="item-img fl">
                            <img src="<?php echo $j_v['user_head']?>" class="head-img"/>
                        </div>
                        <div class="item-detail">
                            <div class="detail1">
                                <p class="title pfbold one-txt-cut"><?php echo $j_v['title']?></p>
                            </div>
                            <div class="detail2">
                                <span><?php echo $j_v['commentnumber']?> &nbsp;评论</span>
                            </div>
                            <div class="detail3">
                                <div class="text">
                                    <?php echo $j_v['problem_content']?>
                                </div>
                            </div>
                        </div>
                    </a>
                <?php }?>
            </div>
        </div>
        <hr class="bgcolor">
    <div class="main-content tword-content">
        <div class="c-title">
            <img src="_images/icon/index-icon1.png"/>
            <p class="pfbold">生活杂谈</p>
        </div>
        <br/>
        <br/>
        <div class="c-list">
            <?php foreach ($share_list as $s_v){?>
            <a class="list-item clearfix" href="<?php echo url('life/share_detail',['id'=>$s_v['id']])?>">
                <div class="item-img fl">
                    <img src="<?php echo $s_v['user_head']?>" class="head-img"/>
                </div>
                <div class="item-detail">
                    <div class="detail1">
                        <p class="title pfbold one-txt-cut"><?php echo $s_v['title']?></p>
                    </div>
                    <div class="detail2">
                        <span><?php echo $s_v['appreciate_number']?> &nbsp;点赞</span>
                        <span><?php echo $s_v['comment_number']?> &nbsp;评论</span>
                    </div>
                    <div class="detail3">
                        <div class="text">
                            <?php echo $s_v['content']?>
                        </div>
                    </div>
                </div>
            </a>
            <?php }?>
        </div>
    </div>


    <hr class="bgcolor">
    <div class="main-content tword-content">
        <div class="c-title">
            <img src="_images/icon/index-icon1.png"/>
            <p class="pfbold">活动天地</p>
        </div>
    <br/>
    <br/>
        <div class="c-list">
            <?php foreach ($topic_list as $t_v){?>
            <a class="list-item clearfix" <?php if(in_array($t_v['type'],[1,2,4])){?>
                href="<?php echo url('travel/strategy_detail',['id'=>$t_v['id'],'type'=>$t_v['type']])?>"
            <?php }elseif($t_v['type']==3){?>
                href="<?php echo url('travel/mate_detail',['id'=>$t_v['id']])?>"
            <?php }?>>
                <div class="item-img fl">
                    <img src="<?php echo $t_v['user_head']?>" class="head-img"/>
                </div>
                <div class="item-detail">
                    <div class="detail1">
                        <span class="tag color1">
                            <?php switch ($t_v['type']){
                                case 1:
                                    echo '活动攻略';
                                    break;
                                case 2:
                                    echo '活动问答';
                                    break;
                                case 3:
                                    echo '活动组团';
                                    break;
                                case 4:
                                    echo '活动分享';
                                    break;
                            }?>
                        </span>
                        <p class="title pfbold one-txt-cut"><?php echo $t_v['title']?></p>
                    </div>
                    <div class="detail2">
                        <span><?php echo $t_v['appreciate']?> &nbsp;点赞</span>
                        <span><?php echo $t_v['comment']?> &nbsp;评论</span>
                    </div>
                    <div class="detail3">
                        <div class="text">
                            <?php echo $t_v['content']?>
                        </div>
                    </div>
                </div>
            </a>
            <?php }?>
        </div>
    </div>
</div>
</body>
</html>
<script>
    $('.undo').click(function () {
        layer.msg('功能规划中，暂未开放');
    })
</script>